<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery1.9/jquery-1.9.0.js"></script>
    <script>
        $(function(){
            $("#btn").click(function(){
                // $("#mydiv").css("color","red");
                // $("#mydiv").css("font-size","40px");
                // $("#mydiv").css("border","1px solid red");
                // // $("#mydiv").css("width","500px");
                // // $("#mydiv").css("height","500px");
                // $("#mydiv").width(500);
                // $("#mydiv").height(500);

                //链式写法
                // $("#mydiv").css("color","red").css("font-size","40px").css("border","1px solid red").width(600).height(600);

                //传递对象  jQuery对象.css(对象);
                $("#mydiv").css({
                    "color":"green",
                    "border":"1px solid red",
                    "font-size":"40px",
                    "width":"600px",
                    "height":"600px"
                });


            });
        });
    </script>
</head>
<body>
    <input type="button" value="设置样式" id="btn">
    <div id="mydiv">
        mydiv
    </div>
    <div></div>
</body>
</html>